package demo2;

//牛牛的快递

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        float a = scanner.nextFloat();
        char ch = scanner.next().charAt(0);
        int sum = 0;
        if(a < 1) {
            sum = 20;
        }else {
            sum = 20;
            float k = a - 1;
            if(k%1!=0) k++;
            sum += k;
        }

        if(ch == 'y') {
            sum += 5;
        }
        System.out.println(sum);
    }
}
